spaceflight_simulatorfandomcom-20200213-history
Planet Editor Tutorial/Terrain Editing
Starting with the base input line in the planet text file we have the following section. This is a clean slate base code available to create/edit. These are what tell the game you are inputting terrain formulas. "terrainFromula": [ "OUTPUT = AddHeightMap ( )”, "OUTPUT = AddHeightMap ( )”, "OUTPUT = AddHeightMap ( )”, "M = AddHeightMap( )”, “M2 = AddHeightMap( )” ], It is assumed that these can technically be infinite, though too many lines could have adverse effects such as more intensive GPU processing, terrain lag, game crashing/freezing or any other mayhem. These formulas can change dramatically depending on the size or “radius” of the planet. Smaller planets are more heavily affected by large numbers in the formula so the user must be mindful of this. When making any existing planet/moon smaller or larger the user must change the numbers in the formulas accordingly. There are 5 sections in each formula available to edit. Here is a look at the following formula and a brief description of what each part does. For the formula in the parentheses we will name each part as (section1, section2, section3, section4, section5). As of right now there are only 5 sections in the formula available to edit. "OUTPUT = AddHeightMap( Perlin, 250, 30, Curve1, M)" Section1 of the formula has a name and each name does something different by giving the terrain a different texture. Available height maps names: Craters: This is a given. It produces a crater effect. This one in particular happens to make the plateau between the craters rise in height as the second number in the formula is made higher. Crater formulas usually have a lower Section2 and a higher Section3. It doesn’t take a dramatically high iteration number such as the Perlin formulas to see the effects. Perlin: Gives the appearance of rolling hills. The effects of a Perlin formula are much more noticeable on a smaller radius planet. Perlin formulas usually have a higher Section2 and a lower Section3. A high iteration number is required to visually see the effect on large planets. The following are also available but it is recommended to leave them in their own planets: * Deimos * Io * Mars * Phobos Section2 of the formula has to do with the amount of iterations of the formula across the planet surface. A value of 1 would mean that only 1 iteration of the formula is created and spreads out the formula across the entire surface. It is recommended the user add a higher number of iterations for large radius planets. Some base planets that have their own particular height map will use the value of 1 in a formula. Section3 of the formula is in regards to the height/depth of the effects in meters. The user may also produce negative numbers in this section such as the following OUTPUT = AddHeightMap( Perlin, 250, ''-30, Curve1, M) This makes the particular terrain lower as opposed to the positive numbers that raise the terrain value. '''Section4' of the formula has to do with Curves. Curves are used to modify the shape of the formula terrain values and each Curve(Curve1 thru Curve8) gives a different effect. This section also has the ability to use the “null” attribute so as not to apply any curve to the formula. Section5 of the formula is for additions to the particular line the user is editing. What this effect produces is an add-on to an existing terrain formula. Such as giving the plateaus of craters a Perlin effect so they aren’t just “flat”. “M” can be used as universal input(for the particular planet only) and can be added to each individual output line. The user can also input additional M series lines such as M2, M3 and so on to give a planet a widely varied look. Completed formulas should look like this. Please be mindfully of the commas and note where they are placed. The last line (here the “M”) never has a comma. If the formula the user has created has one line only then no comma must be used on the formula line. "terrainFromula": [ "OUTPUT = AddHeightMap(Craters, 20, 200, null, M)”, “OUTPUT = AddHeightMap(Craters, 15, 100, Curve1, M)”, "M = AddHeightMap(Perlin, 300, 50)” ], This tutorial gives some insight into how to construct a base terrain for a planet. The final process is mostly trial-and error-and is ultimately up to the end user on how it will appear. Players should always click on the “Build New Rocket” button as resuming the game during terrain editing can have some undesired effects. Category:Gameplay